home *** CD-ROM | disk | FTP | other *** search
- Path: news.kolumbus.fi!usenet
- From: "R.K.Brand" <ralph@www.partio.fi>
- Newsgroups: comp.lang.c
- Subject: How to detect EOF?/filepointer problem.
- Date: Sat, 13 Apr 1996 04:00:02 -0700
- Organization: Kolumbus Information Network, Finnet Group
- Message-ID: <316F8932.2BAF@www.partio.fi>
- NNTP-Posting-Host: kasav6.kauniainen.fi
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- Sorry to bother you, but I have a problem
- while scanning through a file too see whether
- or not a certain word occurs.
- When I run out of file, fscanf() keeps
- returning the last line, instead of some NULL
- value I would find logical (but who am I?).
-
- How can I test for the end of the file?
-
- The second problem is how to manipulate a
- pointer of type "FILE"..so, a filepointer.
- At a certain point I want to skip 11 chars back
- in the file and start writing.
-
- string-=11; gives me an error and after
- string--; fprintf(string,"foo"); does not do
- anything anymore.
-
- I you respond to this one, please do also mail
- me a copy.
-
- Thanks,
-
- Roel.
-